#@layout()
#define main()
<h1>订票管理&nbsp;&nbsp;
    #if(session.user.role==3)
    <a href="/buyrecord/add">创建订票</a>
    #end
</h1>
#include("_search.html")
<div class="table_box">
    <table class="list">
        <tbody>
        <tr>
            <th width="4%" style="text-align:center;">id</th>
            <th width="10%" style="text-align:center;">姓名</th>
            <th width="10%" style="text-align:center;">电话</th>
            <th width="15%" style="text-align:center;">身份证</th>
            <th width="10%" style="text-align:center;">航班号</th>
            <th width="10%" style="text-align:center;">票数</th>
            <th width="10%" style="text-align:center;">费用</th>
            <th width="10%" style="text-align:center;">状态</th>
            <th width="20%" style="text-align:center;">操作</th>
        </tr>

        #for(x : buyrecordPage.getList())
        <tr>
            <td style="text-align:center;">#(x.id)</td>
            <td style="text-align:center;">#(x.username)</td>
            <td style="text-align:center;">#(x.tel)</td>
            <td style="text-align:center;">#(x.identitynum)</td>
            <td style="text-align:center;">#(x.flighttimeno)</td>
            <td style="text-align:center;">#(x.ticketnum)</td>
            <td style="text-align:center;">#(x.price)</td>
            <td style="text-align:center;">
                #if(x.status == 0)
                   预定
                #else
                   成交
                #end
            </td>
            <td style="text-align:center;">
                #if(session.user.role==3 && x.status == 0)
                &nbsp;<a href="/buyrecord/delete/#(x.id)">删除</a>
                <!--&nbsp;<a href="/buyrecord/edit/#(x.id)">修改</a>-->
                #end
                #if(session.user.role==2 && x.status == 0)
                &nbsp;<a href="/buyrecord/settlement/#(x.id)">结算</a>
                #end
            </td>
        </tr>
        #end
        </tbody>
    </table>
    #@paginate(buyrecordPage.pageNumber, buyrecordPage.totalPage, "/buyrecord/")
</div>
#end